package com.appbase.custom.base;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Describe: 设备云服务信息
 * Created by Rance Rang on 2019/3/13.
 * <p>
 * Copyright (c) Tange.Inc All rights reserved.
 */
public class ServiceInfo  implements Parcelable {


    public  String  type;
    public  int expiration_time;
    public  String  recording_mode;
    public  int  save_days;
    public  int is_free;
    public boolean built_in;
    public  ServiceInfo(){}


    protected ServiceInfo(Parcel in) {
        type = in.readString();
        expiration_time = in.readInt();
        recording_mode = in.readString();
        save_days = in.readInt();
        is_free = in.readInt();
        built_in = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(type);
        dest.writeInt(expiration_time);
        dest.writeString(recording_mode);
        dest.writeInt(save_days);
        dest.writeInt(is_free);
        dest.writeByte((byte) (built_in ? 1 : 0));
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<ServiceInfo> CREATOR = new Creator<ServiceInfo>() {
        @Override
        public ServiceInfo createFromParcel(Parcel in) {
            return new ServiceInfo(in);
        }

        @Override
        public ServiceInfo[] newArray(int size) {
            return new ServiceInfo[size];
        }
    };
}
